05. Electronics Production

From not knowing what a PCB is, to making one; this week has been about exploring a completely new territory. Hence, I’ll start from basics and expain everything electronics from basics, including the new terms I learned this week.

The goal of this week was to:

What is a PCB?

A printed circuit board(PCB) mechanically supports and electrically connects electronic components or electrical components using conductive tracks, pads and other features etched from one or more sheet layers of copper laminated onto and/or between sheet layers of a non-conductive substrate. Components are generally soldered onto the PCB to both electrically connect and mechanically fasten them to it.
Printed circuit boards are used in all but the simplest electronic products.

Source : PCB - Wikipedia

pcb

An Example of a Printed Circuit Board(PCB) before and after attaching its componenents.

Identifying Electronic Components of a PCB

All electronic devices comprise of several different parts. These parts work together to modify and manage current and voltage to produce the desired effect. PCB’s act as backbones keeping everything connected and compacted in a form that is easy to use.

Circuit Boards : The circuit boards themselves are simple enough. They are just thin, plastic, rectangular plates with layer/layers of conductive copper foil on one or both sides. This copper is etched using milling or plotter machine after designing it as per one’s requirements.

If the copper traces behave like the skeleton of the PCB, acting as its basic structure – then the components are the vital organs. Each one has a different function. They give the circuit the unique qualities that make it fit for its intended purpose. Depending on the device or electronic item a PCB is designed for, different components will be needed for different circuits.

These components can consist of a wide range of electronic parts.

Battery : Provides the voltage to the circuit.

pcb

Resistors : Controls the electric current as it passes through them. They’re colour coded to determine their value.

pcb

LEDs : Light emitting diode. Lights up when current flows through it, and will only allow current to flow in one direction.

pcb

Transistor : Amplifies charge.

pcb

Capacitators : These are components which can harbour electrical charge.

pcb

Inductor : Stores charge and stops and change in current.

pcb

Diode : Allows current to pass in one direction only, blocking the other.

pcb

Switches : Can either allow current or block depending if they are closed or open.

pcb

Symbolic Chart

pcb

Diagrammatic Component Labels

pcb

Mounting components on a Printed Circuit Board(PCB)

These components can be mounted on a circuit board using one of the below methods:

  1. Surface-mount technology : This is a method for producing electronic circuits in which the components are mounted or placed directly onto the surface of printed circuit boards (PCBs). An electronic device so made is called a surface-mount device (SMD).
    An SMT component is usually smaller than its through-hole counterpart because it has either smaller leads or no leads at all. It may have short pins or leads of various styles, flat contacts, a matrix of solder balls (BGAs), or terminations on the body of the component.

  2. Through-hole technology : This refers to the mounting scheme used for electronic components that involves the use of leads on the components that are inserted into holes drilled in printed circuit boards (PCB) and soldered to pads on the opposite side either by manual assembly (hand placement) or by the use of automated insertion mount machines. Through-hole components are best used for high-reliability products that require stronger connections between layers. Whereas SMT components are secured only by solder on the surface of the board, through-hole component leads run through the board, allowing the components to withstand more environmental stress. This is why through-hole technology is commonly used in military and aerospace products that may experience extreme accelerations, collisions, or high temperatures.

pcb

Both technologies can be used on the same board for components not suited to surface mounting such as large transformers and heat-sinked power semiconductors.

Soldering

Soldering is one of the most fundamental skill needed to dabble in the world of electronics.

Solder, as a word, can be used in two different ways. Solder, the noun, refers to the alloy (a substance composed of two or more metals) that typically comes as a long, thin wire in spools or tubes. Solder, the verb, means to join together two pieces of metal in what is called a solder joint. So, we solder with solder!

Everything about soldering

pcb

Though, even after reading tutorials and watching videos, soldering is a skill that one needs to practice in order to master. No, arstist became one by watching others paint!

Group Work

After undertsanding this, we completed on the group assignment to get a better idea of the milling process. Complete documentation for that can be found here.

Since it was first time, everyone had to be a part of everything to understand the process.

Making a FabISP

What is a FabISP?

The FabISP is an in-system programmer for AVR microcontrollers, designed for production within a FabLab. That is, it allows you to program the microcontrollers on other boards you make, using nothing but a USB cable and 6-pin IDC to 6-pin IDC cable.

FabISP

Over the years, there have been various versions of the FabISP and the one I’ve used is with ATtiny45.

How to build a FabTinyISP

Getting your PCB ready

This is the first step in making your circuit board. There are more than one ways to achieve this:

Using Milling Machine

pcb

This is the easier and more commonly used method for making your base circuit board. To start with you need seperate png files for you traces and outline of the board. The files for FabISP can be downloaded here:

Traces
pcb

Outline
pcb

pcb

Installing and setting up Fab Modules

The software used for milling is fabmodules which can be accessed from fabmodules.org

There is also a local version which can be downloaded and installed from here

(Note: For fabmodules to run, you need python which can be installed by entering sudo apt install python pip in terminal)

pcb

Once connected, go back to where we’ll be setting up the milling parameters.

pcb

pcb

pcb

Once this is done, our file is set with the default output parameters.

Setting up the machine

Using Fab modules

Note: Confirm the size of the PCB before proceeding further because with png format, it tends to change the scale when certain changes are made. (It blew up to almost 10 times the size it should be when I tried to rotate it by 90 degrees)

pcb

Once this is set, click on calculate and the computer should display the complete toolpath of the milling process.
Click on save to save the project and send to start the milling.

pcb

pcb
pcb

pcb

pcb

Using Plotter Machine(Hero Shot!)

An optional method is using the plotting machine to cut the PCB on a copper roll.
Steps to use this machine is shown on week 4 documentation.

week 4

But, cutting on copper is bit more difficult than cutting vinyl. Even after getting a perfect test cut, because of the size of the pcb, the output cut was not coming satisfactory at all.

pcb

pcb

Hence, after a few trials, a double pass had to be done with pen pressure of 110gf in order to get better results.

pcb

Once the Circuit is cut on copper, stick it on a piece of acrylic cut in laser machine using the outline file for the PCB as shown.

pcb

(Note : Transferring copper is very difficult since it stickes to the transfer tape better than it stickes to the acrylic surface.
Hence, transferring the acrylic on a double sided tape is advisable brfore cutting it on the plotter machine)

Gathering the components

Before starting the week’s work, all of us collectively worked and organised all the components in compartmentalised boxes and labelled them. Hence, collecting the components for the PCB was a cake-walk.

pcb

The components used in FabISP are:

Hands-on soldering

This was the most exciting task of the week. After a demo from Samuel Hoque, a fellow FabAcademy student with a background in electronics, I started soldering the components onto the surface of the PCB.

pcb

It was particularly difficult to place the tiny components on place at first but I started to get a hang of it towards the end of the week.

pcb

This is how my first circuit looked like. Though, it’s no where near to perfect, it did the job it was built for!

pcb

The connections were tested using the multimeter, as shown below. If the circuit is shorted at any point, the multimeter buzzer would make a sound. Fortunately, it was not and the circuit worked.

pcb

Programming the ISP

This was another part of the week which was difficult to understand. The below link is where I started with to understand programming the ATtiny45.

Programming the FabISP

Since I had linux already running as a virtual OS, I used the below commands by following the tutorial on the above mentioned link.

sudo apt-get update
sudo apt-get upgrade all
sudo apt-get install GCC-avr binutils-avr avr-libc
sudo apt-get install gdb-avr
sudo apt-get install avrdude

Installing gcc-avr

pcb

Once, this is set up, next thing we need to do is download the firmware to program the ISP.
Use the link below.

http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/fts_firmware_bdm_v1.zip

Once this is downloaded, extract the zip folder at a location(I extracted it on desktop). Now go to terminal, and change the directory to this folder.

cd ~/Desktop
cd ~/fts_firmware_bdm_v1

pcb

Once in the directory, connect the ISP to the computer using a programmer. Plug one end to the USB and the other on the header.
Green Light: means that the header is soldered correctly, the board is getting power.
Yellow Light: means that the board is getting power, but most likely the 6-pin programming header is not soldered correctly (re-flow your solder joints / check for cold joints, check for shorts).
Red Light: means that the board is not getting power - check for shorts.

pcb

Now, in terminal, after navigating into the unzipped file, enter the below command.

make

This will build the hex file that will get programmed onto the ATtiny45.

pcb

Now enter, make flash
This will erase the target chip, and program its flash memory with the contents of the .hex file you built before.

pcb

and then, make fuses
This will set up all of the fuses except the one that disables the reset pin.

pcb

Once finished, its time to check the ISP. For that, enter lsusb

And the result should have “Multiple Vendors USBtiny” device.

pcb

Thus, we’ve finished programming this ISP. We will use this ISP to programme other boards in coming weeks.

Group Work

The Group Assignment for this week can be found here